package com.youlu.campus.entity.enums;

/**
 * @author : [dengbo]
 * @className : ActivityVideoEnum
 * @description : [视频活动状态]
 * @createTime : [2022/5/18 13:48]
 */
public enum ActivityVideoStatusEnum {
    TODO("待上传", -1),
    UN_LOCK_COURSE("解锁课程", 0),
    STUDYING("观看学习", 1),
    DO_THE_TITLE("考试答题", 2),
    RECEIVE_CERTIFICATE("领取证书",3),
    PASS("审核通过",4),
    NOT_PASS("审核不通过",5)
    ;
    // 成员变量
    private final String name;
    private final int type;

    // 构造方法
    ActivityVideoStatusEnum(String name, int type) {
        this.name = name;
        this.type = type;
    }

    // 普通方法
    public static String getName(int type) {
        for (ActivityVideoStatusEnum c : ActivityVideoStatusEnum.values()) {
            if (c.getType() == type) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public int getType() {
        return type;
    }
}
